package cn.three.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.catalina.connector.Request;

import cn.three.biz.userBiz;
import cn.three.eneity.User;

public class userLoginServlet extends HttpServlet {
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
				HttpSession session= req.getSession();
				String name=req.getParameter("username");
				String pwd=req.getParameter("userpwd");
				User user=new User();
				user.setUserAcc(name);
				user.setUserPwd(pwd);
				userBiz biz=new userBiz();
				User us=biz.userlogin(user);
				if(us!=null){
					resp.sendRedirect("main.jsp");
				}
				
			
	
	}

}
